package com.iwhalecloud.bss.kite.cucc.spec.impl.query;

import com.iwhalecloud.bss.kite.dataservice.api.IQueryOfferOrderTimesRuleService;
import com.iwhalecloud.bss.kite.dataservice.entity.OfferOrderTimesRule;
import com.iwhalecloud.bss.kite.dataservice.mapper.other.OfferOrderTimesRuleMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service("spec.queryOfferOrderTimesRuleService")
public class OfferOrderTimesRuleQueryService implements IQueryOfferOrderTimesRuleService {

    @Resource
    private OfferOrderTimesRuleMapper offerOrderTimesRuleMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public OfferOrderTimesRule getOfferOrderTimesRule(String offerId) {
        return offerOrderTimesRuleMapper.getOrderTimes(offerId);
    }
}
